package m.toolkit.console;
import java.util.Properties;

import m.Config;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * @author ming
 * @date 2014年2月23日上午9:07:53
 */
public class CommandConfig {
	private static Logger log = LoggerFactory.getLogger(CommandConfig.class);
	
	private static String propertie(String key){
		Properties p= Config.readProperties(Config.THREAD_POOL);
		return p.getProperty(key);
	}
	
	//结果按1秒分割
	public static int getOutputTimeSplit(){
		return 1;
	}
	//最多保留30秒的结果
	public static int getOutputSize(){
		return 30;
	}
	
	public static int getCorePoolSize(){
		return Integer.parseInt(propertie("commandPool.corePoolSize"));
	}
	
	public static  int getMaximumPoolSize(){
		return Integer.parseInt(propertie("commandPool.maximumPoolSize"));
	}
	public static int getKeepAliveTime(){
		return Integer.parseInt(propertie("commandPool.keepAliveTime"));
	}
}




